#include <iostream>
#include <vector>
#include <list>

using namespace std;

int main(void)
{
	vector<int> v;
	list<int> l;

	for(int i=0; i<8; i++)
	{
		v.push_back(i);
		l.push_back(i);
	}

	cout << "v[2] = " << v[2] << endl;
	//cout << "l[2] = " << l[2] << endl; //compile error, list not overload []
	cout << (v.begin() < v.end()) << endl;
	//cout << (l.begin() < l.end()) << endl; //compile error, list:iterator not overload < or >
	cout << *(v.begin() + 1) << endl;

	vector<int>::iterator itv = v.begin();
	list<int>::iterator itl = l.begin();
	itv = itv + 2;
	//itl = itl + 2; //compile error, list:iterator not verload +
	itv++; itl++; //list:iterator only overload ++

	cout << *itv << endl;
	cout << *itl << endl;

	return 0;
}
